Create Database Users
GO
USE Users
GO
CREATE TABLE Users
(
USERID Uniqueidentifier primary key,
Accountname nvarchar(100) not null,
Image nvarchar(100) not null,
Firstname nvarchar(100) not null,
Lastname nvarchar(100) not null,
Gender nvarchar(10) not null,
Age int not null,
Information nvarchar(max)
)
GO
CREATE TABLE Wall
(
MessageID UniqueIdentifier primary key,
Title nvarchar(100),
Message nvarchar(max),
Sentdate nvarchar(20),
Sender UniqueIdentifier,
Recepient UniqueIdentifier,
FOREIGN KEY (Sender) REFERENCES Users(USERID),
FOREIGN KEY (Recepient) REFERENCES Users(USERID)
)
GO
CREATE TABLE Message
(
MessageID UniqueIdentifier primary key,
Message nvarchar(max),
Sentdate nvarchar(20),
Sender UniqueIdentifier,
Recepient UniqueIdentifier,
FOREIGN KEY (Sender) REFERENCES Users(USERID),
FOREIGN KEY (Recepient) REFERENCES Users(USERID)
)